import config from "@/config"
import http from "@/utils/request"

export default {
    page: {
        url: `${config.API_URL}/system/role/page`,
        name: "角色分页查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    tree: {
        url: `${config.API_URL}/system/role/tree`,
        name: "获取角色树",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    save: {
        url: `${config.API_URL}/system/role/save`,
        name: "保存角色信息",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    deletes: {
        url: `${config.API_URL}/system/role/deletes`,
        name: "批量删除角色",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    }
}